<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {}

        .box div {
            width: 400px;
            height: 400px;
            background: red;
            /* 左浮动 */
            /* float: left; */
            /* 右浮动 */
            float: right;
            margin-left: 10px;
        }

        /* 让浮动实现元素左右布局 */
    </style>
</head>

<body>
    <!-- 浮动 -->
    <!-- 语法：float: (left/right) -->
    <div class="box">
        <div>1</div>
        <div>2</div>
    </div>
</body>

</html>